Thursday, October 5, 2023

// // Leave a Comment

Guide: How to configure Email Alerts to monitor VPN tunnel status in Azure portal

 In today's post, I will explain how to configure Email Alerts to notify you whenever the VPN tunnel status changes from Connected to Disconnected and vice versa.

You need an Active VPN Tunnel to configure the Alerts to Monitor the VPN tunnel Status. Lets get started,

1. Go to your Azure Portal
2. Navigate to Monitor-> Alerts and then click on Create.

                  

 

3.   In condition tab, use the below query to check the VPN status. In Alert logic, set the threshold value as per your requirement. In my case, it's set to 0. This query will evaluated every 10 minutes and you can set the timings as per your requirement and the minimum time you can set is 5 minutes.

       
        AzureDiagnostics
        | where Category == "TunnelDiagnosticLog"
        | where status_s == "Disconnected"
        | where TimeGenerated > ago(5m)

    

 Also, ensure that you have enabled diagnostic logging on your VPN gateway; without that, your Azure Log Analytics will not collect your VPN tunnel logs.

 


0 Comments:

Post a Comment